package com.doform.android.xianggucheng.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.doform.android.xianggucheng.R;
import com.doform.android.xianggucheng.bean.GuidBean;
import com.doform.android.xianggucheng.retrofit.subscriber.ErrorHandleSubscriber;
import com.doform.android.xianggucheng.widget.TitleBar;

import butterknife.BindView;
import io.reactivex.annotations.NonNull;

/**
 * Created by Administrator on 2017/5/16.
 */

public abstract class BaseTitleActivity extends BaseActivity {

    @BindView(R.id.titleBar)
    protected
    TitleBar titleBar;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        titleBar.setBackListener(this);
    }

    public class SubmitResultSubscriber extends ErrorHandleSubscriber<GuidBean> {
        @Override
        public void onNext(@NonNull GuidBean guidBean) {
            finish();
        }
    }

    public class SubmitResultSubscriber2 extends ErrorHandleSubscriber<String> {
        @Override
        public void onNext(@NonNull String guidBean) {
            finish();
        }
    }
}
